﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DeviceLendList.aspx.cs" Inherits="DeviceLendList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
   <script language=javascript>
     function seltime(inputName)
     {
	window.open('seltime.aspx?InputName='+inputName+'','','width=250,height=220,left=360,top=250,scrollbars=yes');  
     }
  
   </script>
</head>
<body>
    <form method="post" id="frmAnnounce" runat="server">
      <table width=842 border=0 cellpadding=0 cellspacing=0 align="center">
        <tr style="color:blue;font-size:14px;">
	  <td style="height: 14px">
          <img src="images/list.gif" width=14px height=14px>设备借环管理--&gt;设备归还</td>
        </tr>
        <tr>
          <td style="height: 18px">
              设备名称:<asp:TextBox ID="DeviceName" runat="server" Width="62px"></asp:TextBox>设备类别:<asp:DropDownList
                  ID="DeviceType" runat="server" Width="63px" DataSourceID="DeviceTypeNameDataSource" DataTextField="deviceTypeName" DataValueField="deviceTypeName">
              </asp:DropDownList>&nbsp; 开始时间:<asp:TextBox ID="StartTime" runat="server" Width="65px"></asp:TextBox>
              <input class="submit" name="Button" onclick="seltime('StartTime')" style="width: 30px"
                  type="button" value="选择" />结束时间:<asp:TextBox ID="EndTime" runat="server" Width="64px"></asp:TextBox>
              <input class="submit" name="Button" onclick="seltime('EndTime')" style="width: 30px"
                  type="button" value="选择" />
              <asp:Button ID="Btn_Query" runat="server" OnClick="Btn_Query_Click" Text="查询" /><br />
              <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                  BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
                  CellPadding="3" CellSpacing="2" DataSourceID="LendInfoDataSource" OnRowDataBound="GridView1_RowDataBound"
                  Width="842px">
                  <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                  <Columns>
                      <asp:BoundField DataField="deviceName" HeaderText="设备名称" SortExpression="deviceName" />
                      <asp:BoundField DataField="DeviceTypeName" HeaderText="设备类别" />
                      <asp:BoundField DataField="departmentName" HeaderText="借出部门" SortExpression="departmentName" />
                      <asp:BoundField DataField="lendPerson" HeaderText="设备借出人" SortExpression="lendPerson" />
                      <asp:BoundField DataField="lendDate" HeaderText="借出日期" SortExpression="lendDate" />
                      <asp:BoundField DataField="lendDays" HeaderText="外借天数" SortExpression="lendDays" />
                      <asp:HyperLinkField DataNavigateUrlFields="deviceId" DataNavigateUrlFormatString="DeviceReturnBack.aspx?lendId={0}"
                          HeaderText="操作" Text="&lt;img src='images/lock.gif'width=14 height=14 border=0&gt;归还" />
                  </Columns>
                  <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                  <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                  <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                  <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="Lime" />
              </asp:GridView>
              <asp:SqlDataSource ID="LendInfoDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                  SelectCommand="SELECT * FROM [lendInfoView] WHERE ([isReturn] = @isReturn)"> 
                  <SelectParameters>
                      <asp:Parameter DefaultValue="false" Name="isReturn" Type="Boolean" />
                  </SelectParameters>
              </asp:SqlDataSource>
              <asp:SqlDataSource ID="DeviceTypeNameDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                  SelectCommand="SELECT [deviceTypeName] FROM [deviceType]"></asp:SqlDataSource>
          </td>
        </tr>
      </table>
    </form>
</body>
</html>
